package com.cays.myresearch.entity;

import android.widget.ListView;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class Person {
    long id;
    String name;
    String nick;
    String password;
    String time;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public ClassesPay payClasses(Classes classes){
        ClassesPay pay=new ClassesPay();
        pay.setCoursename(classes.getTitle());
        pay.setIdentify(classes.getDate());
        pay.setName(name);
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());// new Date()为获取当前系统时间
        pay.setTime(time);
        return pay;
    }
    public List<Question> queryQuestion(){
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());// new Date()为获取当前系统时间
        return null;
    }
    public List<Classes> queryClasses(){
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());// new Date()为获取当前系统时间
        return null;
    }
    public List<Projects> queryProject(){
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());// new Date()为获取当前系统时间
        return null;
    }
    public QuestionAnswer answerQuestion(String title,String context,Question question){
        QuestionAnswer questionAnswer=new QuestionAnswer();
        questionAnswer.setQuestionname(question.getTitle());
        questionAnswer.setIdentify(question.getTime());
        questionAnswer.setIdentify(title);
        questionAnswer.setContent(context);
        questionAnswer.setName(name);
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());// new Date()为获取当前系统时间
        questionAnswer.setTime(time);
        return questionAnswer;
    }

}
